import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../index.dart';

class CustomSliverBar extends GetView<WalletController> {
  final Widget content;
  final Widget bottom;

  const CustomSliverBar({
    super.key,
    required this.content,
    required this.bottom,
  });

  @override
  Widget build(BuildContext context) {
    return SliverAppBar(
      title: const Text('我的钱包'),
      pinned: true,
      stretch: true,
      expandedHeight:
          kToolbarHeight + kHeaderHeight + controller.statusBarHeight,
      flexibleSpace: FlexibleSpaceBar(
        collapseMode: CollapseMode.parallax,
        background: content,
      ),
      bottom: PreferredSize(
        preferredSize: Size(Get.width, kTabbarHeight),
        child: bottom,
      ),
    );
  }
}
